<template>
	<view class="memory">
		<comHead title="记忆瞬间" :isLeft="true" :isRight="false"></comHead>

		<view class="tabs">
			<view class="item" v-for="(item,index) in arr" @click="changeTabs(index)">
				<text :class="active==index?'on':''">{{item}}</text>
			</view>
		</view>
		<view class="heng" v-if="active==0">
			<view class="item" v-for="(item,index) in 10">
				<image src="https://siha.vxmeng.com/static/index/heng.png" mode="aspectFill"></image>
				<text>这是剧情的名称大概10个字左右…</text>
			</view>
		</view>
		<view class="shu" v-else>
			<view class="item" v-for="(item,index) in 10">
				<image src="https://siha.vxmeng.com/static/index/shu.png" mode="aspectFill"></image>
				<text>这是剧情的名称大概10个字左右…</text>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				arr: ['LEVEL 01-01', 'LEVEL 01-02', 'LEVEL 01-03'],
				active: 0
			}
		},
		methods: {
			changeTabs(index) {
				this.active = index
			},
		}
	}
</script>

<style lang="less" scoped>
	.memory {
		.tabs {
			display: flex;
			align-items: center;
			justify-content: space-between;
			padding: 0 30rpx;
			box-sizing: border-box;
			.item {
				display: flex;
				align-items: center;
				justify-content: center;

				text {
					display: inline-flex;
					color: #6B6B6B;
					font-size: 28rpx;
					padding: 10rpx 0;

					&.on {
						color: #fff;
					}
				}
			}
		}
		.heng{
			width: 100%;
			padding: 0 30rpx;
			box-sizing: border-box;
			/* #ifdef APP */
			height: calc(100vh - 200rpx);
			/* #endif */
			/* #ifdef H5 */
			height: calc(100vh - 150rpx);
			/* #endif */
			overflow: auto;
			.item{
				width: 100%;
				color: #D8D8D8;
				font-size: 28rpx;
				display: flex;
				flex-direction: column;
				// align-items: center;
				justify-content: center;
				margin-top: 30rpx;
				image{
					width: 690rpx;
					height: 390rpx;
					margin-bottom: 10rpx;
				}
			}
		}
		.shu{
			width: 100%;
			padding: 0 30rpx;
			box-sizing: border-box;
			height: calc(100vh - 150rpx);
			overflow: auto;
			display: flex;
			flex-wrap: wrap;
			justify-content: space-between;
			.item{
				width: 48%;
				color: #D8D8D8;
				font-size: 28rpx;
				display: flex;
				flex-direction: column;
				// align-items: center;
				justify-content: center;
				margin-top: 30rpx;
				image{
					width: 336rpx;
					height: 596rpx;
					margin-bottom: 10rpx;
				}
			}
		}
	}
</style>